#define _CRT_SECURE_NO_WARNINGS  1
#include <stdio.h>
#include <math.h>
int number(int m, int n)
{
    int count = 0;
    while (m != 0)
    {
        count++;
        m = m / 10;
    }
    count *= n;
    return count;
}
long long int repeat(int k, int d)
{
    long long a1 = 0;
    int j = 0;
    for (j = 0; j < d; j++)
    {
        a1 = a1 * pow(10, number(k, 1)) + k;
    }
    return a1;
}
int main()
{
    int arr[4] = { 0 };
    int i = 0;
    for (i = 0; i < 4; i++)
    {
        scanf("%d", &arr[i]);
    }
    if ((arr[1] % arr[3] == 0) || (arr[3] % arr[1] == 0))
    {
        if (arr[3] > arr[1])
        {
            arr[3] = arr[3] / arr[1];
            arr[1] = 1;
        }
        else
        {
            arr[1] = arr[1] / arr[3];
            arr[3] = 1;
        }
    }
    if (number(arr[0], arr[1]) != number(arr[2], arr[3]))
    {
        printf(number(arr[0], arr[1]) > number(arr[2], arr[3]) ? "Greater" : "Less");
    }
    else
    {
        if (repeat(arr[0], arr[1]) != repeat(arr[2], arr[3]))
        {
            printf(repeat(arr[0], arr[1]) > repeat(arr[2], arr[3]) ? "Greater" : "Less");
        }
        else
        {
            printf("Equal");
        }
    }
    return 0;
}